#!/usr/bin/env python

from __future__ import with_statement
import sys

if __name__ == '__main__':

    if len(sys.argv) != 3:
        print 'Error! Usage: <input file with the values> <percentil (ex: 99 for 99% percentil)>'
        sys.exit(1)

    file_name = sys.argv[1]
    percentil = int(sys.argv[2])

    #Read all values...
    with open(file_name, 'r') as h:
        numbers = [float(v.strip()) for v in h.readlines()]

    numbers.sort(reverse=True)
    
    total = len(numbers)
    print numbers[int(percentil/100. * total)]
